{% load taxonomy %}
{% load i18n %}

{% if children %}
    {% for child in children %}
        <li id="taxonomy-term-{{child.term.id}}" class="taxonomy-draggable taxonomy-indent{{indent}}">{{child.name}}
            {% if child.term.use_bridge %}
                [{% trans "serve" %}: {{child.term.use_bridge.name}}]
            {% endif %}
            {% if child.term.display_children_counts %}
                [{% trans "counts" %}]
            {% endif %}
            {% if child.term.render_as_instance %}
                [{% trans "as_instance" %}]
            {% endif %}
            {% if child.term.render_teasers %}
                [{% trans "teasers" %}]
            {% endif %}
            <div class="taxonomy-term-operations">
                <a href='./term/{{child.term.id}}'>{% trans "Change" %}</a>&nbsp;|&nbsp;
                {% if not max_reached %}
                    <a href='' onclick='taxonomy_add_child({{child.term.id}});return false;'>{% trans "Add Child" %}</a>&nbsp;|&nbsp;
                {% endif %}
                <a href='' onclick='taxonomy_add_child({{term.id}});return false;'>{% trans "Add Sibling" %}</a>&nbsp;|&nbsp;
                <a href='' onclick='taxonomy_detach({{child.term.id}});return false;'>{% trans "Detach" %}</a>&nbsp;|&nbsp;
                <a href='' onclick='taxonomy_delete({{child.term.id}});return false;'>{% trans "Delete" %}</a>
            </div>
            {# render term children, if any #}
            {% if child.children %}
                {% taxonomy_admin_render_list child.term indent %}
            {% endif %}
        </li>
    {% endfor %}
{% endif %}

